﻿using Project.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Project.DAL
{
    public class GoodsDal:BaseDal<Goods>
    {
        Entities model = new Entities();

        public bool xgzt(bool zt, int id)
        {
            var data = model.Goods.Where(g => g.gId == id).FirstOrDefault();
            data.on_sale = zt;
            int count = model.SaveChanges();
            return count > 0;
        }
    }
}
